A computer application typically provides a page to a device for printing and/or display in the form of a description of the page, with the description provided to device driver software of the device in a page description language (PDL), such as Adobe® PostScript® or Hewlett-Packard® PCL. The PDL provides descriptions of objects to be rendered onto the page in a rendering (or Z-) order, as opposed to a raster image of the page to be printed. Equivalently, a set of descriptions of graphic objects may be provided in function calls to a graphics interface, such as the Graphical Device Interface (GDI) in the Microsoft Windows™ operating system, or X-11 in the Unix™ operating system. The page is typically rendered for printing and/or display by an object-based graphics system, also known as a Raster Image Processor (RIP).
Page representations e.g. PDL scripts vary in complexity. The complexity of a page representation is related to object density and the amount of overlap within the page. For example, for page representations containing text only the object density is low and there is usually no compositing to be performed. Hence, such a page representation would not be considered to be complex. In contrast, a page representation with hundreds of overlapping transparent bitmaps for example, requires compositing and bitmap interpolation and would be considered to be complex. Unfortunately, the complexity of a page representation is unknown until the entire page representation has been interpreted by the printer device. Due to the varying and unpredictable complexity of page representations a printer device cannot guarantee that all page representations can be rendered in real-time. Hence, typical printer devices found in the prior art spool an entire page of pixels in memory before shipping the rendered pixels to the printer engine.
In general a printer device renders the page to pixels in a memory buffer. The memory buffer may contain the pixels required for the entire page or for a band of the page. Once a band has been completely rendered to pixels, lossy compression is applied to the pixel data for that band to reduce the memory requirements of the printer. The compressed pixels are then stored in memory at least until the entire page has been rendered to pixels and compressed. Once the entire page has been spooled to memory, the compressed pixels are decompressed and shipped to the printer engine. In some cases, several pages may be spooled to memory before the compressed pixels are decompressed and shipped to the printer engine to allow constant paper feed in the device.
This approach has two major problems. Firstly, the page is rendered to pixels at the device resolution. An A4 page at 600 dpi resolution may require over one hundred megabytes of pixel data to be stored in memory. Compressing the pixel data alleviates the problem to some extent, particularly when the pixel data has already been halftoned. However, many megabytes of memory are still required to store the compressed pixel data.
The memory requirements of this configuration are particularly sensitive to an increase in page resolution, for example, an increase in page resolution from 600 dpi to 1200 dpi may increase the memory requirements by up to a factor of four. Similarly, the memory requirements of this configuration are also sensitive to an increase in page dimensions. A twelve colour channel A0 plotter may require several gigabytes of compressed pixel data to be stored in memory.
The second problem with this approach is that lossy image compression algorithms such as JPEG are generally used to reduce the memory requirements of the printing device. As a result there will be a loss in the quality of the rendered output. Such quality degradation is manifest when the compression algorithm is applied to sharp edges commonly found in text and graphic regions of the page, resulting in undesirable visual artefacts.
Yet another problem exists with printer devices which operate in low memory environments. As complex page representations generally require a large amount of memory for storage and processing, printer devices with low memory may not be able to both store and process the entire page representation. Typical low memory devices found in the prior art divide the page representation into several layers. Each layer will contain objects within a predetermined range of Z-orders. In these devices, each layer will be rendered into a background image. This background image is then compressed and subsequently decompressed as subsequent layers are rendered into the buffer. A lossy compression algorithm such as JPEG is used to compress the background image. As a result of several compression and decompression stages the final quality of the image may incur substantial loss.